<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{nocache}</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="language.builtin.functions.html" title="Chapter 7. Built-in Functions">
<link rel="prev" href="language.function.literal.html" title="{literal}">
<link rel="next" href="language.function.php.html" title="{php}">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">{nocache}</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="language.function.literal.html">Prev</a> </td>
<th width="60%" align="center">Chapter 7. Built-in Functions</th>
<td width="20%" align="right"> <a accesskey="n" href="language.function.php.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="{nocache}">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="language.function.nocache"></a>{nocache}</h2></div></div></div>
<p>
   <code class="varname">{nocache}</code> is used to disable caching of a template section. 
   Every <code class="varname">{nocache}</code> must be paired with a matching
   <code class="varname">{/nocache}</code>.
  </p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
   Be sure any variables used within a non-cached section are 
   also assigned from PHP when the page is loaded from the cache.
  </p>
</div>
<div class="example">
<a name="id377821"></a><p class="title"><b>Example 7.60. Preventing a template section from being cached</b></p>
<div class="example-contents">
<pre class="programlisting">


Today's date is
{nocache}
{$smarty.now|date_format}
{/nocache}

   </pre>
<p>
    The above code will output the current date on a cached page.
   </p>
</div>
</div>
<br class="example-break"><p>
  See also the
  <a class="link" href="caching.html" title="Chapter 15. Caching">caching section</a>.
 </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="language.function.literal.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="language.builtin.functions.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="language.function.php.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">{literal} </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> {php}</td>
</tr>
</table>
</div>
</body>
</html>
